One of the Alpha's features is that you can define a key binding for almost everything. In HTML mode and CSS mode there is an easy way to add key bindings to the menu items and to change or remove the existing key bindings.
But first a list of key bindings not found in the menus:
shift-ctrl-opt-, | inserts < |
---|---|
shift-ctrl-opt-. | inserts > |
shift-ctrl-opt-7 | inserts & |
shift-ctrl-opt-space | inserts |
To modify the key bindings in the menus choose 'Key Bindings...' in the HTML Utilities menu. You are first presented with a list where you pick the menu you want to redefine. Let's for example choose the menu 'Blocks and Dividers'.
First a window is opened, as shown above, with the current key bindings.
Beside each menu item, or pair of menu items for dynamic ones, is a button 'Set...'. Clicking such a button opens another window where you can change the binding. For example, clicking 'Set...' beside 'Block Quote' opens the window
For dynamic items the checkbox for option is absent. Option is always used to toggle between the two items of the dynamic menu item and doesn't have to be selected explicitly.
To define a binding either select 'Normal key' in the popup menu and type a character in the text box, or choose one of the special keys in the popup menu. Then choose which of the modifiers shift, ctrl, option, and command you want.
To remove a binding either select <No binding> in the popup menu or select 'Normal key' and clear the textbox.
Tip: To find out if a certain key combination already is used for anything, type F7 and then the key combination. An alert then shows which the bindings is. If you want a list of all bindings defined, use Config -> Global -> List Bindings.
Unfortunately it is not possible to define key bindings containing accented characters like é, ü, ä in the way described above. In you want bindings with such characters you have to put some code in your HTML preferences file. Menu items are bound to keys with statements such as:
bind 'c' <modifier string> {htmlMenuItem "submenu" "menu item"} HTML
where c is a character, <modifier string> is an optional string containing one or more of:
c - command modifier
o - option modifier
s - shift modifier
z - control modifier
For example, to bind 'Check Window' to ctrl-opt-W, use the statement
bind 'w' <zo> {htmlMenuItem "Check Links" "Check Window"} HTML
As another example, to bind 'Import Table...' to ctrl-shift-J, use the statement
bind 'j' <zs> {htmlMenuItem "Tables" "Import Table"} HTML
Such statements can be put in your HTML prefs file. Use Config -> Current Mode -> Edit Prefs File. If a menu item ends with three dots ... the dots must be omitted in the above statement defining the key binding. For more information about defining key bindings, see the general manual for Alpha.
Command-double-clicking on an opening tag lets you change the attributes of the tag. This is equivalent of using 'Change container/Change opening' in the Editing menu. However, clicking on a color or URL attribute has a special effect, see below.
Command-double-clicking on a color attribute brings up a color picker where you can change the color.
Command-double-clicking on an include tag opens the file.
Command-double-clicking on an absolute URL sends the URL to your web browser. This is not limited to HTML mode. It is a general feature of Alpha.
Command-double-clicking on a relative URL attribute opens a new window with the file if the file exists and is a text file. If it does not exist, a dialog box appears as the one shown below. As you see, a new empty window can be opened with the name of the file. This window is automatically saved in the right place, and if necessary new folders are created. Thus, if you are making a new set of pages, you can make links to the ones you have not written yet and then, by cmd-double-clicking, let Alpha make empty files which are saved where you want them.
Command-double-clicking on a CSS URL property has the same effect.
Command-double-clicking on an anchor link <A HREF="#anchor"> jumps to the corresponding <A NAME="anchor"> in the file.
If the URL you click on points to a non-text file like an image, the file is opened in the application it was created with. If you don't want to open non-text files this way you can disabled this feature by unchecking 'Cmd-double-clicking on non-text file link opens file' in the general preferences dialog.